<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>菜品类别编辑</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <i th:replace="~{common :: baseUrl}"></i>
</head>
<body>


<input hidden id="recordId" th:value="${recordId}">
<table class="layui-hide" id="foodRecord" lay-filter="foodRecord" align="center"></table>



<script th:src="@{/layui/layui.js}"></script>
<script th:inline="none">
    //JavaScript代码区域
    layui.use(['element','table'], function(){
        var element = layui.element;
        var table = layui.table;
        var $ = layui.$;


        //表格初始化
        table.render({
            elem: '#foodRecord'
            ,url:baseUrl+'inventory/record/list'
            ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            ,width: 700

            ,cols: [[

                {field:'date', width:200, title: '时间', sort: true}
                ,{field:'operator', width:100, title: '操作人'}
                ,{field:'operatorWay', width:150, title: '操作方式'}
                ,{field:'oldRepertory', width:120, title: '修改前库存'}
                ,{field:'changeRepertory', width:120, title: '库存变动'}
            ]]
            ,skin: 'line' //行边框风格
            ,even: true //开启隔行背景
            ,page: true
            ,where: {
                recordId:$("#recordId").val()


            } //设定异步数据接口的额外参数

        });

    });

</script>
</body>
</html>